##############################################################
# CMakeLists.txt for a ROS package within the low-cost-vision
# build system. 
# 
# Created by Pascal Muller <pascalmuller@gmail.com>, 09-02-2012
# 
# 09-02-2012 Initial version
# 
#############################################################

cmake_minimum_required(VERSION 2.4.6)
# Include all rosbuild macros
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)

if(Boost_FOUND) 
	# Initialize ROS package to be in our build system. 
	lcv_rospack_init("equipletnode" true false)

	# Add executables as documented by ROS
	file(GLOB sources src/*.cpp)
	rosbuild_add_executable(equipletnode ${sources})

	# Add dependencies to our libraries and other ROS packages in the same directory as this one. 
	add_dependencies(equipletnode grippernode BlackboardClient xml_io)

	# Include libraries
	include_directories(${Boost_INCLUDE_DIRS} ${LIB_BLACKBOARDCLIENT_INCLUDE} ${LIB_AUTOKEYSTORE_INCLUDE} ${LIB_XMLIO_INCLUDE} ${LIB_DATATYPES_INCLUDE})

	# Link target to our libraries
	target_link_libraries(equipletnode BlackboardClient xml_io ${Boost_THREAD_LIBRARY})

	# MUST be called after lcv_rospack_init to clean up after ROSBUILD!
	lcv_rospack_end()
# Oh, let's just warn we omitted an target. 
else(Boost_FOUND) 
	lcv_cannot_build(equipletnode, "ROS/equipletnode")
endif(Boost_FOUND) 
